import React from 'react'
import { Switch, Route, withRouter } from 'react-router-dom'
import LoadableComponent from '@/utils/LoadableComponent'

const Index = LoadableComponent(import('./index'))
const videoList = LoadableComponent(import('./videoList'))

@withRouter
class VideoRouter extends React.Component {
  render () {
    return (
      <Switch>
        <Route path='/main' component={Index} />
        <Route path='/videolist' component={videoList} />
      </Switch>
    )
  }
}

export default VideoRouter
